﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Sponsors/SponsorMaster.Master"
    AutoEventWireup="true" CodeBehind="SponsorPreferences.aspx.cs" Inherits="Nivdal.Sponsors.SponsorPreferences"
    StylesheetTheme="SkinFile" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:Label ID="PageNameLabel" runat="server" Text="<%$ Resources:SponsorsResource, NewSponsor_SponsorsSponsorPreferences %>"
        CssClass="PageNameContentStyle"></asp:Label>
    <br />
    <br />
    <asp:Label ID="MessageLabel" runat="server" SkinID="ConfirmLabel"></asp:Label>
    <asp:HiddenField ID="IsImageChecked" runat="server" />
    <br />
    <asp:FormView ID="SponsorPreferencesFormView" runat="server" DataSourceID="NewSponsorGetDetailsSqlDataSource"
        EnableModelValidation="True" CellPadding="4" ForeColor="#333333">
        <EditItemTemplate>
            <asp:Label ID="NameTitleLabel" runat="server" Text="<%$ Resources:SponsorsResource, NewSponsor_Name %>"
                SkinID="InfoLabel" />
            <asp:TextBox ID="NameTextBox" runat="server" CssClass="InputTextBox" Text='<%# Bind("Name") %>' />
            <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="NameTextBox"
                ErrorMessage="<%$ Resources:SponsorsResource, NewSponsor_NameIsRequire %>" Display="Dynamic"
                ValidationGroup="UpdateUserWizard"></asp:RequiredFieldValidator>
            <br />
            <br />
            <asp:Label ID="Label1" runat="server" CssClass="InputTextBox" Text="<%$ Resources:SponsorsResource, NewSponsor_Banner %> "
                SkinID="InfoLabel" />
            Banner:
            <asp:HiddenField ID="OldBannerURLHiddenField" Value='<%# Bind("Banner") %>' runat="server" />
            <asp:FileUpload ID="BannerFileUpload" runat="server" />
            &nbsp; &nbsp;
            <asp:Image Width="100px" runat="server" ID="NormalImage" Visible="false" />
            <br />
            <asp:Label ID="BannerTipLabel" runat="server" Text="<%$ Resources:SponsorsResource, NewSponsor_BannerSizeTip %>"></asp:Label>
            &nbsp; &nbsp;
            <asp:Button ID="UploadBannerButton" runat="server" Text="<%$ Resources:SponsorsResource, NewSponsor_ShowBanner %>"
                OnClick="Upload_Click" />
            <%--<asp:TextBox ID="BannerTextBox" runat="server" CssClass="InputTextBox" Text='<%# Bind("Banner") %>' />--%>
            <br />
            <br />
            <asp:Label ID="LinkTitleLabel" runat="server" Text="<%$ Resources:SponsorsResource, NewSponsor_Link %> "
                SkinID="InfoLabel" />
            <asp:TextBox ID="LinkTextBox" runat="server" CssClass="InputTextBox" Text='<%# Bind("Link") %>' />
            <asp:RequiredFieldValidator ID="LinkRequiredFieldValidator" runat="server" ControlToValidate="LinkTextBox"
                Display="Dynamic" ErrorMessage="<%$ Resources:SponsorsResource, NewSponsor_LinkRequired %>"
                ValidationGroup="UpdateUserWizard"></asp:RequiredFieldValidator>
            <br />
            <br />
            <asp:HiddenField ID="CreditUsageMultiplierHiddenField" Value='<%# Bind("CreditUsageMultiplier") %>'
                runat="server" />
            <asp:Label ID="EmailTitleLabel" runat="server" Text="<%$ Resources:SponsorsResource, NewSponsor_Email %> "
                SkinID="InfoLabel" />
            <asp:TextBox ID="emailTextBox" runat="server" CssClass="InputTextBox" Text='<%# Bind("email") %>' />
            <asp:RequiredFieldValidator ID="EmailRequired" runat="server" ControlToValidate="EmailTextBox"
                Display="Dynamic" ErrorMessage="<%$ Resources:SponsorsResource, NewSponsor_EmailIsRequire %>"
                ValidationGroup="UpdateUserWizard"></asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator ID="EmailValidationExpressionValidator" runat="server"
                ControlToValidate="EmailTextBox" Display="Dynamic" ErrorMessage="<%$ Resources:SponsorsResource, NewSponsor_NotLegalEmail %>"
                ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ValidationGroup="UpdateUserWizard">
            </asp:RegularExpressionValidator>
            <br />
            <br />
            <asp:Label ID="TeamsLimitTitleLabel" runat="server" CssClass="InputTextBox" Text="<%$ Resources:SponsorsResource, NewSponsor_TeamsLimit %> "
                SkinID="InfoLabel" />
            <asp:TextBox ID="TeamsLimitTextBox" runat="server" CssClass="InputTextBox" Text='<%# Bind("TeamsLimit") %>' />
            <asp:RequiredFieldValidator ID="TeamsLimitRequiredFieldValidator" runat="server"
                ControlToValidate="TeamsLimitTextBox" Display="Dynamic" ErrorMessage="<%$ Resources:SponsorsResource, NewSponsor_TeamsLimitRequired %>"
                ValidationGroup="UpdateUserWizard"></asp:RequiredFieldValidator>
            <br />
            <br />
            <asp:Button ID="SubmitButton" runat="server" ValidationGroup="UpdateUserWizard" Text="<%$ Resources:SponsorsResource, NewSponsor_Submit %>"
                OnClick="SubmitButton_Click" />
            <%-- <asp:LinkButton ID="UpdateButton"  runat="server" CausesValidation="True" 
                CommandName="Update" Text="Update" />--%>
            &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False"
                CommandName="Cancel" Text="Cancel" />
        </EditItemTemplate>
        <EditRowStyle BackColor="#999999" />
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <ItemTemplate>
            <asp:Label ID="NameTitleLabel" runat="server" Text="<%$ Resources:SponsorsResource, NewSponsor_Name %> "
                SkinID="InfoLabel" />
            <asp:Label ID="NameLabel" runat="server" Text='<%# Bind("Name") %>' />
            <br />
            <br />
            <asp:Image Width="100px" runat="server" ID="NormalImage" ImageUrl='<%# Bind("Banner") %>' />
            <br />
            <br />
            <asp:Label ID="LinkTitleLabel" runat="server" Text="<%$ Resources:SponsorsResource, NewSponsor_Link %> "
                SkinID="InfoLabel" />
            <asp:Label ID="SponsorHomePageLabel" runat="server" Text='<%# Bind("Link") %>' />
            <br />
            <br />
            <asp:Label ID="CreditsTitleLabel" runat="server" Text="<%$ Resources:SponsorsResource, NewSponsor_Credits %> "
                SkinID="InfoLabel" />
            <asp:Label ID="CreditsLabel" runat="server" Text='<%# Bind("Credits") %>' />
            <br />
            <asp:Label ID="CreditUsageMultiplierLabel" runat="server" Visible="false" Text='<%# Bind("CreditUsageMultiplier") %>' />
            <br />
            <asp:Label ID="EmailTitleLabel" runat="server" Text="<%$ Resources:SponsorsResource, NewSponsor_Email %> "
                SkinID="InfoLabel" />
            <asp:Label ID="emailLabel" runat="server" Text='<%# Bind("email") %>' />
            <br />
            <br />
            <asp:Label ID="TeamsLimitTitleLabel" runat="server" Text="<%$ Resources:SponsorsResource, NewSponsor_TeamsLimit %> "
                SkinID="InfoLabel" />
            <asp:Label ID="TeamsLimitLabel" runat="server" Text='<%# Bind("TeamsLimit") %>' />
            <br />
            <br />
            <asp:LinkButton ID="EditButton" runat="server" CausesValidation="False" CommandName="Edit"
                Text="Edit" />
        </ItemTemplate>
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
    </asp:FormView>
    <asp:SqlDataSource ID="NewSponsorGetDetailsSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_NewSponsorGetDetails" SelectCommandType="StoredProcedure"
        UpdateCommand="Nivdal_NewSponsorUpdateDetails" UpdateCommandType="StoredProcedure">
    </asp:SqlDataSource>
    <br />
    <asp:HyperLink ID="HyperLinkChooseCountry" runat="server" Text="<%$ Resources:SponsorsResource, NewSponsor_ChooseCountry %> "
        NavigateUrl="~/Sponsors/ChooseCountries.aspx"></asp:HyperLink>
    <br />
    <br />
    <asp:HyperLink ID="ChangePasswordHyperLink" runat="server" Text="<%$ Resources:SponsorsResource, NewSponsor_ChangePassword %> "
        NavigateUrl="~/Sponsors/ChangePassword.aspx"></asp:HyperLink>
</asp:Content>
